
<div class="btn-group"><a href="<?php echo site_urlc('article/index');?>" class="btn"> <i class="fa fa-arrow-left"></i> <?php echo lang('back_list')?> </a></div>

<?php include_once 'inc_form_errors.php'; ?>

<div class="boxed">
	<h3> <i class="fa fa-pencil"></i> 详细信息 <span class="badge badge-success pull-right"><?php echo $title; ?></span></h3>
	<?php echo form_open(current_urlc(), array('class' => 'form-horizontal', 'id' => 'frm-edit')); ?>

	<div class="boxed-inner seamless">

		<div class="control-group">
			<label for="title" class="control-label">标题:</label>
			<div class="controls">
                <?php echo $it['title']; ?>
                <span class="help-inline"></span>
			</div>
		</div>

        <div class="control-group">
            <label class="control-label" for="content"> 内容 </label>
            <div class="controls">
                <?php if($it['content']!=''){echo $it['content'];}?>
            </div>
        </div>

	</div>
</form>
</div>

<!-- 注意加载顺序 -->
<?php include_once 'inc_ui_media.php'; ?>
<script type="text/javascript">
	require(['adminer/js/ui','adminer/js/media','bootstrap-datetimepicker.zh'],function(ui,media){
		$('.timepicker').datetimepicker({'language':'zh-CN','format':'yyyy/mm/dd hh:ii:ss','todayHighlight':true});
		console.log(ui);
		ui.editor_create('content');
		media.init();

		var articles_photos = <?php echo json_encode(one_upload($it['photo'])) ?>;
		media.show(articles_photos,"photo");

	});
</script>
